package projet_v1.items.help;

import projet_v1.Breed;
import projet_v1.Character;
import projet_v1.Human;
import projet_v1.Item;
/**
 * This class manages the first aid kits.
 * 
 * @author Alexis Laurent
 * 
 */
public class FirstAidKit extends Item {

	private int hpRecup;

	 /**
     * Constructor of FirstAidKit class.
     */
	public FirstAidKit() {
		super(Item.CODE_HEALTH_ITEM);
		hpRecup = 20;
	}

	@Override
	public void use(Character c) {
		assert c.getBreed().equals(Breed.HUMAN);
		
		int newHp = c.getHealthPoints() + hpRecup;
		if(newHp > ((Human) c).HP_HUMANS)
			newHp = ((Human) c).HP_HUMANS;
		
		((Human) c).setHealthPoints(newHp);
	}

}
